<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <meta content="text/html;charset=utf-8"></meta>
    <title>商户项目管理</title>
    <link rel="stylesheet" href="/static/js/common/bootstrap/css/bootstrap.min.css"></link>
    <link rel="stylesheet" href="/static/js/common/layer/theme/default/layer.css"></link>
    <link rel="stylesheet" href="/static/css/base.css"></link>

    <script src="/static/js/common/jquery/jquery-3.2.1.min.js"></script>
    <script src="/static/js/common/layer/layer.js"></script>
    <script src="/static/js/base/base.js"></script>
    <script>
        //记录翻页
        function listRecord(data, nowPageNo) {
            var pageSize = "${listResult.pageSize}";
            var url = "${basePath}" + "/bus/project/pageList";
            defaultPageRecord(pageSize, nowPageNo, url);
        }

        //删除记录
        function deleteRecord(data) {
            var url = "${basePath}" + "/bus/project/delete/";
            defaultDelRecord(data, url);
        }

        //修改模态窗弹出
        function modifyModal(data) {
            var url = "${basePath}" + "/bus/project/info/";
            defaultSkipModifyModal(data, url);
        }

        //修改提交
        function modifyRecord(id, revision, type, busId) {

            var url = "${basePath}" + "/bus/project/updateVersion/?versionId=" + id + "&versionNo=" + revision + "&updateType=" + type + "&busId=" + busId;
            //局部刷新
            // asyncRefreshURL(url, $("#list_table"), " #list_table");
            defaultUpdateRecordByGet(url);
        }


    </script>
</head>
<body>
 <@_top.top 1/>
<div class="container" style="padding-bottom: 15px;min-height: 300px; padding-top: 60px;">
    <div class="row">
        <@_left.bus 1/>
        <div class="col-md-10 col-xs-10">
            <h2>商户项目列表</h2>
            <hr>
            <form class="form-inline" id="queryForm" role="form">
                <input type="text" name="busName" class="form-control" id="queryName" placeholder="请输入商户名称">
                <button type="button" onclick="listRecord(this)" class="btn btn-primary">查询</button>
                <#--<button type="button" class="btn btn-success" data-toggle="modal" data-target="#modal_add" >添加</button>-->
                <!-- 表示应谨慎采取的动作 -->
            </form>
            <hr>
            <!-- 表格 -->
            <div id="list_table">
            <table class="table table-hover table-bordered" id="role_grade">
            <#--<caption>悬停表格布局</caption>-->
                <thead>
                <tr>
                    <th>序号</th>
                    <th>商户名称</th>
                    <th>更新备注</th>
                    <th>操&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;作</th>
                </tr>
                </thead>
                <tbody>
                <#list listResult.list as busProjectVersionVO>
                <tr>
                    <td style="display: none" id="id_${busProjectVersionVO.id}">${busProjectVersionVO.id}</td>
                    <td class="col-md-1">${busProjectVersionVO_index  + 1}</td>
                    <td class="col-md-2">${busProjectVersionVO.busName?default("")}</td>
                    <td class="col-md-6">${busProjectVersionVO.remark?default("")}</td>


                    <td class="col-md-1">
                        <button id="update" type="button" onclick="modifyModal(this)" class="btn btn-warning">版本修改</button>
                        <#--<button id="delete" type="delete" onclick="deleteRecord(this)" class="btn btn-danger">删除</button>-->
                    </td>
                </tr>
                </#list>
                </tbody>
            </table>
            </div>

            <nav aria-label="Page navigation" style="text-align: right">
                <ul class="pagination" id="table_pagging">
                    <#assign pageNum=listResult.totalPageNo>
                    <#if pageNum==0>
                        <#assign pageNum=1>
                    </#if>
                    <#list 1..pageNum as pn>
                        <li id="a_${pn}" class="${(pn==listResult.nowPageNo)?string('disabled','')}"><a onclick="${(pn==listResult.nowPageNo)?string('','listRecord(this, ${pn})')}" href="#" >${pn}</a></li>
                    </#list>
                </ul>
            </nav>
        </div>
    </div>
</div>


<div id="info_modify">

</div>


<script src="/static/js/common/bootstrap/js/bootstrap.min.js"></script>

</body>

</html>





